package com.atguigui.leetcode1;

/**
 * 1016.子串能表示从 1 到 N 数字的二进制串
 * Project: leetcode
 * Package: com.atguigui.leetcode1
 * Version: 1.0
 * <p>
 * Created by WJX on 2023/5/11 11:14
 */
public class P1016BinaryStringWithSubstringsRepresenting1ToN {
    public static void main(String[] args) {
        Solution solution = new P1016BinaryStringWithSubstringsRepresenting1ToN().new Solution();
        // TO TEST
    }

    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public boolean queryString(String s, int n) {
            for (int i = 1; i <= n; i++)
                if (!s.contains(Integer.toBinaryString(i)))
                    return false;
            return true;
        }
    }
}
